package cn.itsource.pethome.pet.service.impl;

import cn.itsource.pethome.basic.service.impl.BaseServiceImpl;
import cn.itsource.pethome.pet.domain.Pet;
import cn.itsource.pethome.pet.mapper.PetMapper;
import cn.itsource.pethome.pet.service.IPetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PetServiceImpl extends BaseServiceImpl<Pet> implements IPetService {

    @Autowired
    private PetMapper petMapper;
    /**
     * 上架
     *
     * @param pets
     * @param status
     */
    @Override
    public void onSale(List<Pet> pets, int status) {
        //修改状态
        petMapper.updateState(pets, status);
    }

    /**
     * 下架
     *
     * @param pets
     * @param status
     */
    @Override
    public void offSale(List<Pet> pets, int status) {
        //修改状态
        petMapper.updateState(pets, status);
    }
}
